import request from '@/utils/request'

// 查询支付列表
export function listPayinfo(query) {
  return request({
    url: '/pay/payinfo/list',
    method: 'get',
    params: query
  })
}

// 查询采收支付列表
export function listForHarvestbill(query) {
  return request({
    url: '/pay/payinfo/listForFreightorder',
    method: 'get',
    params: query
  })
}

// 导出采收支付列表
export function listForForderExport(query) {
  return request({
    url: '/pay/payinfo/listForFreightorderExport',
    method: 'get',
    params: query
  })
}

// 查询采购支付列表
export function listForPurchasebill(query) {
  return request({
    url: '/pay/payinfo/listForPurchasebill',
    method: 'get',
    params: query
  })
}

// 导出采购支付列表
export function listForPbillExport(query) {
  return request({
    url: '/pay/payinfo/listForPurchasebillExport',
    method: 'get',
    params: query
  })
}

// 查询种植户列表
export function getPlanters() {
  return request({
    url: '/pay/payinfo/getPlanters',
    method: 'get'
  })
}

// 查询支付详细
export function getPayinfo(guid) {
  return request({
    url: '/pay/payinfo/' + guid,
    method: 'get'
  })
}

// 新增支付
export function addPayinfo(data) {
  return request({
    url: '/pay/payinfo',
    method: 'post',
    data: data
  })
}

// 修改支付
export function updatePayinfo(data) {
  return request({
    url: '/pay/payinfo',
    method: 'put',
    data: data
  })
}

// 删除支付
export function delPayinfo(guid) {
  return request({
    url: '/pay/payinfo/' + guid,
    method: 'delete'
  })
}

// 导出支付
export function exportPayinfo(query) {
  return request({
    url: '/pay/payinfo/export',
    method: 'get',
    params: query
  })
}

// 查询支付明细
export function getPayRecords(query) {
  return request({
    url: '/pay/record/list',
    method: 'get',
    params: query
  })
}
